/*noOrJ7++a/0AHs4Hd/BD2TANqjd7ereMJT1hk4p7TMV3BOJ6CHTaMaTPP35veuR7*/
import { AREA, FIELD } from '../../constance';

export default function clickImageScanBtn(props) {
	let selrows = props.table.getCheckedRows(AREA.list_head);
	if (selrows.length == 0) {
		showWarningInfo(null, getLangByResId(this, '4004PUINVOICE-000051')); /* 国际化处理： 错误,请选择要联查的发票！*/
	}

	const billId = selrows[0].data.values.pk_invoice.value;
	const billtype = selrows[0].data.values.vtrantypecode.value;
	const pk_org = selrows[0].data.values.pk_org.value;
	const tradetype = selrows[0].data.values.vtrantypecode.value;
	const viewRandom = randomNum();
	this.setState({ sscivmInvoiceData: { billId, billtype, pk_org, tradetype, viewRandom } });
}
/**
 * 取得随机数
 */
function randomNum() {
	const crypto = window.crypto || window.msCrypto;
	var array = new Uint32Array(1);
	let rNum = crypto.getRandomValues(array)[0];
	return rNum / Math.pow(10, (rNum + '').length);
}

/*noOrJ7++a/0AHs4Hd/BD2TANqjd7ereMJT1hk4p7TMV3BOJ6CHTaMaTPP35veuR7*/